Okay.
So today we're going to take a look back at GIS and look at some constraints.
UI constraints allow you to add some changes onto your objects you wouldn't have been able to have done
before.
And it makes it much easier actually, to make quite a few things.
Like of all things, there's quite a few, but only have a couple of them I think are the most useful.
I'm going to go over most of majority of them, but again, just be aware that only a couple of them
would probably be the most useful for you.
Okay, cool.
So let's add in a screen UI onto your UI, and let's add in a just like a frame to start off with.
Okay, let's click the plus.
And if you scroll down eventually exactly where they are but they should.
Yeah here we go guy.
So we've got all our stuff here okay.
Let me keep scrolling down.
You'll get some constraints.
So um these you have aspect ratio constant UI corner gradient, grid layout, padding UI scale, a UI
stroke, all that kind of stuff here.
Okay.
Um, so the first one I want to have a look at is UI corner.
This one has lots of applications when it comes to, um, in games.
And I think it's actually really going to take your guys up a level, basically apply that and we get
a nice corner to our frame like this here.
And we click on this.
You can increase the corner radius to let's say 20 for example.
And we get a nice corner to it like this here.
This can work really well for buttons and just general and just frames in general really to just make
it look a bit more, um, look, make it give it a different kind of theme really, as sometimes your
guys can look quite blocky without them.
Um, so it's a really cool one there to keep an eye on.
Some other ones we have to look at with just this frame, the UI scale, perhaps, um, this one, you
can increase the scale and that would basically the advantage of using this is that it increases the
scale, not just without just not not just for that object, but also for all the object objects inside
of it as well.
So that could be useful if you ever want to do that.
Um, some other ones, I've mean, a majority of these do have other ones I think UI gradient perhaps.
So UI gradient allows you to change, um, allows you to create a color which fades in and out basically.
So let's say the color of this frame is red, for example.
Okay.
Let's go over to the UI gradient.
Let's change the color of the UI gradient to be a um, blue, which kind of change it there to kind
of kind of mix the colors together using this UI gradients.
Okay.
But the biggest use of this is if you click on the color and click on the three dots, this will appear
here, which allows you to change the gradient at different times.
So the biggest use of this is to give it a color start and a color at the end I'll change the start
color to let's say um, red and the end color is just white.
It creates this nice fade like this here.
And I might in fact just, um, increase the amount.
This is done by just by adding some more in and kind of pushing it, pushing the color backwards a bit
just so it's a bit, um.
Um.
I don't like that too much.
Let's try again.
Let's change this to Red.
And if you change the end color to perhaps be like a lighter red, it'll be a bit less obvious like
that.
There.
Okay.
Press close.
And I think the reason this is not showing is because I've got the color here to be red.
We change this to just be a standard white color.
Like that there and there we go.
We have a nice gradient there on the color.
Okay, so I think the more subtle the gradient is the better it looks, but it just makes it look a
bit more lifelike and a bit more stuff going on with it basically.
So I think it's a really cool addition that you can make.
Okay.
So you can add whatever color sequences you'd like.
You can add in multiple colors just by clicking left clicking somewhere on the map and changing the
color at that point.
Add a blue in and it starts to look pretty, pretty strange and pretty cool.
Okay, so definitely play on that one.
It's pretty cool to try out that one there.
Okay.
You can also change the rotation as well if you wanted to of the color or also make it backwards if
you decided to, and also offset it slightly as well.
And in case you wanted to do something like that there as well.
Okay, cool.
The other ones are other objects.
So if we add in a text label, the next one I want to show you is to do with it's the stroke.
And the stroke creates a text stroke.
Stroke.
A border around your text.
So say we got this text here.
Let's set the label visible to be off so we can just not visible, but transparency and make this nice
and large so we can easily see what's going on.
If we change the color of this to be white, for example, it creates a nice a nice stroke here above
it like that there.
Okay.
And this can be easily changed because you have different colors, different thicknesses.
If you wanted to like that there as well, change the color to maybe make it like a red or a blue or
green, something like that.
So a nice cool addition you can make to make your text kind of glow, or any other kind of effects you
can add onto your text.
Okay.
But yeah, again, really cool one worth trying out and playing around with.
Um, and I think there's only one more really that I'd like to show you.
Um, which would be, it would take a bit, maybe take a little while to set up.
But if we add a frame in and this frame, let's say, covers this distance here I'm going to make just
the sizing, not using offset.
It'll be easier if we don't.
Like.
That's fair.
Cool.
So this is it.
Here.
Now imagine this here is like a shop, for example, that opens up on your screen.
Okay, you've probably had the issue where if you want multiple items to show in your shop in like a
grid, like one here, one here, one here, it's very difficult because you need to make sure that
the distance between each one is correct and everything is laid out correctly, but the grid layout
completely takes care of that for you.
So adding the grid layout, which means that if we add in, let's say some other frames and all these
frames, let's just say, ah, um, a pinky kind of color.
So they're very obvious that we can see them go into the grid layout, and we can change the size and
the padding between each cell for cell size is the size of each frame inside of it, and the cell padding
is the distance between each one.
So let's change the cell size let's say to be 0.1.
I'm probably a bit more 0.2.
I quite like that.
And then this one here.
Point.
Or.
Yeah, let's leave it as that.
And then we can change the cell padding to be how much you'd like.
So if you want there to be some more padding between each one, you can change that to there.
So we add multiple and we can see as we add them in it lays them out quite nicely like that for us.
So really cool and also quite cool as well if you don't want to the shops for example, you might not
want um, all objects to show at once.
Like maybe when you buy an object, buy an item, it it gets removed from a shop or an inventory where
you're not able to set the guy up yourself.
You have to add these in yourself.
So add these in via a script because you don't know what objects and what items the player is going
to have in their inventory.
This is really useful just to make sure that you're not having to do a lot of adjustments and stuff.
It's all done for you and taken care of, so it's really cool if you don't like how it starts.
A at left though, you can always change the alignment.
So the horizontal alignment we can set to the center and it's in the center there.
Or set this vertical alignment to the center like that as well.
I think with that I'd probably increase the cell padding a bit.
Um, the cell padding can use offset.
The reason why is basic because it's such a small value, but it's not going to pay too much of a difference.
But again, for the best results, you probably do want to use scale, um, for this.
Um, so let's say the size.
Buy one and it becomes a bit more difficult to do it with.
Three and six look the better like that.
I think that's pretty cool.
But yeah, so Gridlayout is a layout.
As I say, there are other constraints that you can add in.
I just don't think there are as useful.
And some of them, to be honest, um, do the same things as one of the properties do, but just in
a more easy to change and easy to understand way.
Perhaps with some like a couple extra tweaks you can add in that you wouldn't be able to have done before.
So not all of them is useful.
I think the couple I showed you, there are most useful ones out of all of them.
Okay, so hopefully you can apply that to some guys you're making in the future, or you've made past
to really bring up the level of those and make them look a lot cooler and a lot more realistic.
Okay.
And so hopefully you can yeah, make your guys look a lot cooler and better using that and join me in
the next lesson, which can be the final lesson or most likely the final lesson, um, of this section
where we're going to have a look at some extra tabs you can put onto your screen, as I've explained
what obviously the basic tabs are, but there are quite a few other ones which I think are worth knowing
in case you want to use them.
They're probably not ones you're going to be putting onto your screen, um, to use constantly over
time, but they might be ones you can add now and then to, um, speed up your workflow or to make things
easier to work in your game.
Okay, so join me in the next lesson where we have a look at those.